// import com.alibaba.druid.sql.ast.SQLName_ptr;
// import com.alibaba.druid.sql.ast.SQLObject;
// import com.alibaba.druid.sql.ast.SQLStatementImpl;
// import com.alibaba.druid.sql.visitor.SQLASTVisitor;

// import java.util.Collections;
// import java.util.List;

#include "SQLAlterTypeStatement.h"
#include "../../visitor/SQLASTVisitor.h"
#include "../SQLName.h"

SQLName_ptr SQLAlterTypeStatement::getName()
{
  return name;
}

void SQLAlterTypeStatement::setName(SQLName_ptr name)
{
  if (name != nullptr)
  {
    name->setParent(SharedObject(SQLAlterTypeStatement));
  }
  this->name = name;
}

BOOL_ptr SQLAlterTypeStatement::isCompile()
{
  return compile;
}

void SQLAlterTypeStatement::setCompile(BOOL_ptr compile)
{
  this->compile = compile;
}

BOOL_ptr SQLAlterTypeStatement::isDebug()
{
  return debug;
}

void SQLAlterTypeStatement::setDebug(BOOL_ptr debug)
{
  this->debug = debug;
}

BOOL_ptr SQLAlterTypeStatement::isBody()
{
  return body;
}

void SQLAlterTypeStatement::setBody(BOOL_ptr body)
{
  this->body = body;
}

BOOL_ptr SQLAlterTypeStatement::isReuseSettings()
{
  return reuseSettings;
}

void SQLAlterTypeStatement::setReuseSettings(BOOL_ptr reuseSettings)
{
  this->reuseSettings = reuseSettings;
}

void SQLAlterTypeStatement::accept0(SQLASTVisitor_ptr visitor)
{
  if (visitor->visit(SharedObject(SQLAlterTypeStatement)))
  {
    acceptChild(visitor, name);
  }
  visitor->endVisit(SharedObject(SQLAlterTypeStatement));
}

// @Override
SQLObject_list_ptr SQLAlterTypeStatement::getChildren()
{
  SQLObject_list_ptr tmp = std::make_shared<std::list<SQLObject_ptr>>();
  tmp->push_back(this->name);
  return tmp;
}
